﻿using System.IO;

//------------------------------------------------------------
// shaco Framework
// Copyright © 2017-2021 chang.liu All rights reserved.
// Feedback: 449612236@qq.com
//------------------------------------------------------------

namespace shaco.ExcelDataReader.Misc
{
    internal class LeaveOpenStream : Stream
    {
        public LeaveOpenStream(Stream baseStream)
        {
            BaseStream = baseStream;
        }

        public Stream BaseStream { get; }

        public override bool CanRead {get{return BaseStream.CanRead; }}

        public override bool CanSeek {get{return BaseStream.CanSeek; }}

        public override bool CanWrite {get{return BaseStream.CanWrite; }}

        public override long Length {get{return BaseStream.Length; }}

        public override long Position { get {return BaseStream.Position; } set {BaseStream.Position = value; } }

        public override void Flush() {BaseStream.Flush(); }

        public override int Read(byte[] buffer, int offset, int count) {return BaseStream.Read(buffer, offset, count); }

        public override long Seek(long offset, SeekOrigin origin) {return BaseStream.Seek(offset, origin); }

        public override void SetLength(long value) {BaseStream.SetLength(value); }

        public override void Write(byte[] buffer, int offset, int count) {BaseStream.Write(buffer, offset, count); }
    }
}
